package com.example.Service;

import com.example.Dao.LoginMapper;
import com.example.Pojo.Login;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginService {
    @Autowired
    private LoginMapper loginMapper;
    public int getLoginCode(Login login){
        return loginMapper.getLoginCode(login);
    }
    public int getRegisterCode(Login login){
        try{
            loginMapper.getRegisterCode(login);
            return 1;
        } catch (Exception e) {
            return 0;
        }
    }
}
